﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using Hardcodet.Wpf.TaskbarNotification;

namespace WpfApplication1
{
    /// <summary>
    /// Interaction logic for BestillingDaTSCAN.xaml
    /// </summary>
    public partial class DaTSCAN : Window
    {
        public DaTSCAN()
        {
            InitializeComponent();
        }

        private void datscanBestilbutton_Click(object sender, RoutedEventArgs e)
        {
            string DaTSCAN = "DaTSCAN extended shelf life 185MBq, 5mCi";
            int antal = Convert.ToInt32(antalDaTSCANtextBox.Text);
            string dato = leveringsdatoDaTSCANdatePicker.SelectedDate.ToString(); //.ToString("dd-MM-yyyy");           
            int ordreNr = Convert.ToInt32(ordrenrDaTSCANtextBox.Text);
            string bestiltAf = bestiltAfcomboBox.Text;
            
            Bestilling_new.XMLquery(DaTSCAN, antal, dato, ordreNr, bestiltAf);

            Bestilling_new.SendMail("tbs@rn.dk", "DaTSCAN", antal, dato, ordreNr, bestiltAf);

            TaskbarIcon tb = (TaskbarIcon)this.FindResource("MyNotifyIcon");
            //show balloon with built-in icon
            tb.ShowBalloonTip("Bestilling DaTSCAN", "Din Bestilling er gennemført", tb.Icon);
            this.Close();
        }
    }
}
